#include<iostream>
using namespace std;
struct Num{
	int s;
	int x;
};
Num ll[100];
int main(){
	int n,sum_s=0,sum_x=0;
//	scanf("%d",&n);
	for(int i=0;i<10;i++){
		scanf("%d%d",&ll[i].s,&ll[i].x);
	}
	for(int i=0;i<10;i++){
		sum_s+=ll[i].s;
		sum_x+=ll[i].x;
	}
	printf("%d+%di\n",sum_s,sum_x);
	return 0;
}
